From ae87f1d43c6d2cf34bd2ea6fd7b4d28af6d2aa91 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 10 Nov 2023 21:33:49 -0800 Subject: nav update --- .../(app)/funds/[id]/withdraw/+page.server.js | 20 -------- src/routes/(app)/funds/[id]/withdraw/+page.svelte | 58 ---------------------- src/routes/(app)/funds/[id]/withdraw/+server.js | 6 --- 3 files changed, 84 deletions(-) delete mode 100644 src/routes/(app)/funds/[id]/withdraw/+page.server.js delete mode 100644 src/routes/(app)/funds/[id]/withdraw/+page.svelte delete mode 100644 src/routes/(app)/funds/[id]/withdraw/+server.js (limited to 'src/routes/(app)/funds/[id]/withdraw') diff --git a/src/routes/(app)/funds/[id]/withdraw/+page.server.js b/src/routes/(app)/funds/[id]/withdraw/+page.server.js deleted file mode 100644 index 476149f2..00000000 --- a/src/routes/(app)/funds/[id]/withdraw/+page.server.js +++ /dev/null @@ -1,20 +0,0 @@ -import { fail, json, redirect } from '@sveltejs/kit'; -import { fd, auth, post } from '$lib/utils'; - -export async function load({ parent }) { - let { user } = await parent(); - if (!user) throw redirect(307, '/register'); -} - -export const actions = { - default: async ({ cookies, request }) => { - let body = await fd(request); - try { - await post('/take', body, auth(cookies)); - } catch (e) { - return fail(400, { message: e.message }); - } - - throw redirect(307, `/fund/${body.id}`); - } -}; diff --git a/src/routes/(app)/funds/[id]/withdraw/+page.svelte b/src/routes/(app)/funds/[id]/withdraw/+page.svelte deleted file mode 100644 index 9cad945a..00000000 --- a/src/routes/(app)/funds/[id]/withdraw/+page.svelte +++ /dev/null @@ -1,58 +0,0 @@ - - - - -{#if form?.message} -
- {form.message} -
-{/if} - -
- - -
- - - - -
- -
-
-
diff --git a/src/routes/(app)/funds/[id]/withdraw/+server.js b/src/routes/(app)/funds/[id]/withdraw/+server.js deleted file mode 100644 index 0f9a23f3..00000000 --- a/src/routes/(app)/funds/[id]/withdraw/+server.js +++ /dev/null @@ -1,6 +0,0 @@ -import { json } from '@sveltejs/kit'; -import { auth, post } from '$lib/utils'; - -export async function POST({ cookies, request }) { - return json(await post('/take', await request.json(), auth(cookies))); -} -- cgit v1.2.3